import React from 'react'
import './index.scss'
export default class MyFooter extends React.Component {
    state = {
        allState: false
    }
    allStateBtn = (allState) => {
        this.props.dd(allState)
    }

    render () {
        const { allState, sum, num } = this.props

        console.log(num);
        return (
            <div className="my-footer">
                <div className="custom-control custom-checkbox">
                    <input checked={allState} onChange={(allState) => this.allStateBtn(allState)} type="checkbox" className="custom-control-input" id="footerCheck" />
                    <label className="custom-control-label" htmlFor="footerCheck">全选</label>
                </div>
                <div>
                    <span>合计:</span>
                    <span className="price">¥ {sum}</span>
                </div>
                <button type="button" className="footer-btn btn btn-primary">结算 {num}</button>
            </div>
        )
    }

}
